package com.lb.jwitter;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.ForeignKey;

@Entity
@Table (name="tbl_ctdt_nhommhtuchon")
public class Tbl_CTDT_NhomMHTuChon implements Serializable {
   private static final long serialVersionUID = -1989579066723007050L;

   private Long id;
   private String ma;
   private String ten;
   private Double soTinChi;
   private Tbl_CTDT_KhoiNganh khoiNganhId = null;
   private String hocKy;

@Id
   @GeneratedValue
   public Long getId() {
	    return id;
   }
   public void setId(Long id) {
	    this.id= id;
   }

   public String getMa() {
   	return ma;
   }
   public void setMa(String ma) {
   	this.ma= ma;
   }

   public String getTen() {
   	return ten;
   }
   public void setTen(String ten) {
   	this.ten= ten;
   }

   public Double getSoTinChi() {
   	return soTinChi;
   }
   public void setSoTinChi(Double soTinChi) {
   	this.soTinChi= soTinChi;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="KhoiNganhId")
   @ForeignKey(name="FK_tbl_CTDT_KhoiNganh_tbl_CTDT_NhomMHTuChon")
   public Tbl_CTDT_KhoiNganh getKhoiNganhId() {
	    return khoiNganhId;
   }
   public void setKhoiNganhId(Tbl_CTDT_KhoiNganh khoiNganhId) {
	    this.khoiNganhId=khoiNganhId;
   }
   

   public String getHocKy() {
	return hocKy;
	}
	public void setHocKy(String hocKy) {
		this.hocKy = hocKy;
	}
}//endClass 

